<%@page import="edu.hwadee.entity.Carcomplement"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>攀枝花物流管理系统</title>

<link href="../css/bootstrap-combined.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/layoutit.css" rel="stylesheet" type="text/css">
<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script src="../js/jquery-2.0.0.min.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../js/jquery.htmlClean.js"></script>
<script src="../js/scripts.js"></script>
<script src="../js/bootstrap.min.js"></script>

</head>
<body style="margin:0;">

	<%
		if (session.getAttribute("dooption") == null || (boolean) session.getAttribute("dooption") == false) {
	%>
	<s:action name="showCompany" namespace="/jsp"></s:action>
		<!-- 
	这里要改
 -->
	<%
		}
		session.setAttribute("dooption", false);
		if (session.getAttribute("dooptionS") == null || (boolean) session.getAttribute("dooptionS") == false) {
	%>
	<s:action name="showSupplierprice" namespace="/jsp"></s:action>
	<%
		}
		session.setAttribute("dooptionS", false);
	%>
	<s:action name="showCompany" namespace="/jsp"></s:action>
	<s:action name="showCarComplement" namespace="/jsp"></s:action>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<img alt="140x140" src="img/a.jpg" />
			</div>
		</div>
		<div class="row-fluid">
			<div class="span12">
				<div class="navbar">
					<div class="navbar-inner">
						<div class="nav-collapse collapse navbar-responsive-collapse">
							<ul class="nav pull-right">
								<li><span class="badge">1</span></li>
								<li><a href="./ILIP_Inside_MessageCenter.html">个人信息</a></li>
								<li class="divider-vertical"></li>
								<li>
									<div class="btn-group">
										<button class="btn ">用户名</button>
										<button data-toggle="dropdown" class="btn dropdown-toggle">
											<span class="caret"></span>
										</button>
										<ul class="dropdown-menu" contenteditable="true">
											<li><a href="#">设置</a></li>
											<li><a href="#">退出登录</a></li>
										</ul>
									</div>
								</li>
							</ul>
						</div>

					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="span2">
					<div class="accordion" id="accordion-menu">
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-1">基本信息管理</a>
							</div>
							<div class="accordion-body in collapse" id="accordion-element-1">
								<div class="accordion-inner">
									<ul>
										<li><a href="./ILIP_Inside_PersonManagement.html">人员信息管理</a>
										</li>
										<li><a href="#">车辆信息管理</a></li>
										<li><a href="./ILIP_Inside_AddressManagement.html">地址信息管理</a>
										</li>
										<li><a href="#">公司信息管理</a></li>
										<li><a href="./ILIP_Inside_MaterialManagement.jsp">物资信息管理</a>
										</li>
										<li><a href="./ILIP_Inside_DocumentManagement.html">证件信息管理</a>
										</li>
										<li><a href="#">货物信息管理</a></li>
										<li><a href="#">建筑构物信息管理</a></li>
										<li><a href="#">机电设备信息管理</a></li>
									</ul>
								</div>
							</div>
						</div>
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-2">购销存管理</a>
							</div>
							<div class="accordion-body collapse" id="accordion-element-2">
								<div class="accordion-inner">
									<ul>
										<li><a
											href="./ILIP_Inside_ConsumableManagement_Store.html">办公耗材管理</a>
										</li>
										<li><a
											href="./Inside_BuyAndSales_Management_Materials.jsp">物资购销存管理</a>
										</li>
										<li><a href="#">汽车购销存管理</a></li>
										<li><a href="#">货物购销存管理</a></li>
										<li><a href="#">建筑构物租售管理</a></li>
									</ul>
								</div>
							</div>
						</div>
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-3">汽车检修管理</a>
							</div>
							<div class="accordion-body collapse" id="accordion-element-3">
								<div class="accordion-inner">
									<ul>
										<li><a
											href="./ILIP_Inside_CarFix_Management_Accident.html">车辆事故信息管理</a>
										</li>
										<li><a href="./ILIP_Inside_CarFix_Management_Fix.html">汽车检修信息管理</a>
										</li>
										<li><a
											href="./ILIP_Inside_CarFix_Management_Material.html">物资使用信息管理</a>
										</li>
									</ul>
								</div>
							</div>
						</div>
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-4">运输调度管理</a>
							</div>
							<div class="accordion-body collapse" id="accordion-element-4">
								<div class="accordion-inner">
									<ul>
										<li><a
											href="./ILIP_Inside_TransportationTaskManagement.html">运输任务管理</a>
										</li>
										<li><a href="./ILIP_Inside_CarOperationManagement.html">单车运营记录管理</a>
										</li>
										<li><a href="#">承运商业务管理</a></li>
										<li><a href="./ILIP_Inside_RailTransport.html">铁路运输代办管理</a>
										</li>
									</ul>
								</div>
							</div>
						</div>
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-5">对外合作平台管理</a>
							</div>
							<div class="accordion-body collapse" id="accordion-element-5">
								<div class="accordion-inner">
									<ul>
										<li><a href="./ILIP_Inside_Cooperation_About.html">公司简介公告管理</a>
										</li>
										<li><a href="#">供需信息管理</a></li>
									</ul>
								</div>
							</div>
						</div>
						<div class="accordion-group">
							<div class="accordion-heading">
								<a class="accordion-toggle" data-parent="#accordion-menu"
									data-toggle="collapse" href="#accordion-element-6">数据统计分析</a>
							</div>
							<div class="accordion-body collapse" id="accordion-element-6">
								<div class="accordion-inner">
									<ul>
										<li><a href="./ILIP_Inside_ReportManagement.html">周期性报表</a>
										</li>
										<li><a href="./ILIP_Inside_LineChartManagement.html">线性数据折线图</a>
										</li>
										<li><a href="#">业务状况分布图</a></li>
										<li><a href="#">产值利润柱状图</a></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="span10">
					<ul class="breadcrumb">
						<li><a href="./ILIP_Inside_Main.html">主页</a> <span
							class="divider">/</span></li>
						<li><a href="#">基本信息管理</a></li>
						<li><span class="divider">/</span><a
							href="./ILIP_Inside_CompanyManagement.jsp">公司信息管理</a></li>
					</ul>
	<!-- 
	这里要改
 -->

					<div class="tabbable" id="tabs-385726">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#company_info"
								data-toggle="tab">公司基本信息</a></li>
						</ul>
						<hr>
						<div class="tab-content">
							<div class="tab-pane active" id="#company_info">

								<div>

									<form action="searchCompany" method="post"
										class="form-search form-inline" style="float:left;">
										<label class="radio-inline"> <input type="radio"
											name="option" value="1" checked> 公司单位名称
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="2"> 法人代表姓名
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="3"> 公司名称简拼
										</label> <br> <br> <input class="input-medium search-query"
											name="optionvalue" type="text" style="width: 65%"
											placeholder="输入对应条件的值进行查询" value="">
										<button type="submit" class="btn" contenteditable="true">查找</button>
									</form>
									<a href="#add_company_info" role="button" class="btn"
										style="float:right;" data-toggle="modal">添加公司基本信息</a>
								</div>

								<table class="table table-bordered table-hover">
									<thead>
										<tr>
											<th>公司单位编号</th>
											<th>公司单位名称</th>
											<th>联系方式</th>
											<th>法人代表姓名</th>
											<th>公司简介</th>
											<th>公司属性</th>
											<th>资质等级</th>
											<th>公司名称简称</th>
											<th>公司单位代码编号</th>
											<th>公司成立时间</th>
										</tr>
									</thead>
									<tbody>
										<s:iterator id="iterator" value="#session.companylist">
											<tr>
												<td><s:property value="companyId" /></td>
												<td><s:property value="companyName" /></td>
												<td><s:property value="phoneNumber" /></td>
												<td><s:property value="corporation" /></td>
												<td><s:property value="introduction" /></td>
												<td><s:property value="property" /></td>
												<td><s:property value="level" /></td>
												<td><s:property value="pinyin" /></td>
												<td><s:property value="codeNumber" /></td>
												<td><s:property value="formingDate" /></td>
												<td><a role="button" class="btn" data-toggle="modal"
													onclick="update('${companyId}')">修改</a> <a role="button"
													class="btn" data-toggle="modal"
													onclick="deleteId('${companyId}')">删除</a></td>
											</tr>
										</s:iterator>
									</tbody>
								</table>
								<div class="pagination pagination-centered">
									<ul>
										<li><a href="#">上一页</a></li>
										<li><a href="#">1</a></li>
										<li><a href="#">2</a></li>
										<li><a href="#">3</a></li>
										<li><a href="#">4</a></li>
										<li><a href="#">5</a></li>
										<li><a href="#">下一页</a></li>
									</ul>
								</div>

								<div id="add_company_info" class="modal hide fade"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"
											aria-hidden="true">×</button>
										<h4 id="myModalLabel">添加公司基本信息</h4>
									</div>
									<div class="modal-body">
										<form action="addCompany" method="post">
											<table>
												<tr>
													<td>公司单位名称：</td>
													<td><input type="text" name="companyName" value=""></td>
												</tr>
												<tr>
													<td>联系方式：</td>
													<td><input type="text" name="phoneNumber" value=""></td>
												</tr>
												<tr>
													<td>法人代表姓名：</td>
													<td><input type="text" name="corporation" value=""></td>
												</tr>
												<tr>
													<td>公司简介：</td>
													<td><input type="text" name="introduction" value=""></td>
												</tr>
												<tr>
													<td>公司属性：</td>
													<td><input type="text" name="property" value=""></td>
												</tr>
												<tr>
													<td>资质等级：</td>
													<td><input type="text" name="level" value=""></td>
												</tr>
												<tr>
													<td>公司名称简称：</td>
													<td><input type="text" name="pinyin" value=""></td>
												</tr>
												<tr>
													<td>公司单位代码编号：</td>
													<td><input type="text" name="codeNumber" value=""></td>
												</tr>
												<tr>
													<td>公司成立时间：</td>
													<td><input type="text" name="formingDate" value=""></td>
												</tr>
											</table>
											<div class="modal-footer">
												<button type="submit" class="btn btn-primary">确认添加</button>
											</div>
										</form>
									</div>

								</div>
								<div id="change_company_info" class="modal hide fade"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"
											aria-hidden="true">×</button>
										<h4 id="myModalLabel">修改公司基本信息</h4>
									</div>
									<div class="modal-body">
										<form action="changeCompany" method="post">
											<input id="change" type="hidden" name="companyId" value="">
											<table>
												<tr>
													<td>公司单位名称：</td>
													<td><input type="text" name="companyName" value=""></td>
												</tr>
												<tr>
													<td>联系方式：</td>
													<td><input type="text" name="phoneNumber" value=""></td>
												</tr>
												<tr>
													<td>法人代表姓名：</td>
													<td><input type="text" name="corporation" value=""></td>
												</tr>
												<tr>
													<td>公司简介：</td>
													<td><input type="text" name="introduction" value=""></td>
												</tr>
												<tr>
													<td>公司属性：</td>
													<td><input type="text" name="property" value=""></td>
												</tr>
												<tr>
													<td>资质等级：</td>
													<td><input type="text" name="level" value=""></td>
												</tr>
												<tr>
													<td>公司名称简称：</td>
													<td><input type="text" name="pinyin" value=""></td>
												</tr>
												<tr>
													<td>公司单位代码编号：</td>
													<td><input type="text" name="codeNumber" value=""></td>
												</tr>
												<tr>
													<td>公司成立时间：</td>
													<td><input type="text" name="formingDate" value=""></td>
												</tr>
											</table>
											<div class="modal-footer">
												<button type="submit" class="btn btn-primary">确认修改</button>
											</div>
										</form>
									</div>
								</div>
								<div id="delete_company_info" class="modal hide fade"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"
											aria-hidden="true">×</button>
									</div>
									<form action="deleteCompany" method="post">
										<input id="delete" type="hidden" name="companyId" value="">
										<div class="modal-body">
											<h4>是否确认删除</h4>
										</div>
										<div class="modal-footer">
											<button type="submit" class="btn btn-primary">确定</button>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	$("#delete_company_info").modal("hide");
	function deleteId(id) {
		$("#delete_company_info").modal("show");
		var dv = document.getElementById("delete");
		dv.value = id;
	}

	$("#change_company_info").modal("hide");
	function update(companyId) {
		$("#change_company_info").modal("show");
		document.getElementById("change").value = companyId;
	}
</script>
</html>